﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace MyRabbit.EntityFrameWorkCore.Migrations
{
    public partial class addslaughte : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "Slaughte",
                columns: table => new
                {
                    SlaughteId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    ProductionBatch = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
                    AverageWeight = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
                    EntryTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    SlaughteTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    SlaughteEnterpriseId = table.Column<int>(type: "int", nullable: false),
                    Creator = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    CreateTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    IsDelete = table.Column<bool>(type: "bit", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Slaughte", x => x.SlaughteId);
                });

            migrationBuilder.CreateTable(
                name: "SlaughteEnterprises",
                columns: table => new
                {
                    SlaughteEnterpriseId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    SlaughteEnterpriseName = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    EstablishmentTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    SlaughteEnterpriseAddress = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    SlaughteEnterpriseSummary = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Creator = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    CreateTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    IsDelete = table.Column<bool>(type: "bit", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_SlaughteEnterprises", x => x.SlaughteEnterpriseId);
                });
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "Slaughte");

            migrationBuilder.DropTable(
                name: "SlaughteEnterprises");
        }
    }
}
